class ServerThread extends Thread
{
 private Socket s;
 int clientnum;
 public ServerThread(Socket s, int num)
 {
  this.s=s;
  clientnum=num+1;
 }
 public void run()
 {
  try
  {
    InputStream is=s.getInputStream();
   OutputStream os = s.getOutputStream();
   DataInputStream dis = new DataInputStream(is);
   String request = dis.readLine();
   System.out.println(request);
   PrintStream ps =new PrintStream(os);
    ps.println("Bye");
   s.close();
  }
  catch(Exception e)
  {
   System.out.println("异常"+e);
  }
 }
}

